package com.googlecode.afdbaccess.web.common.errorhelp;

import java.io.PrintWriter;
import java.io.StringWriter;
import java.io.Writer;

public class ExceptionToString {
    public static String getStackTraceAsString(final Throwable t) {
        final Writer result = new StringWriter();
        final PrintWriter printWriter = new PrintWriter( result );
        t.printStackTrace( printWriter );
        
        return result.toString();
    }
}

